package com.zzc.controller;

import com.zzc.serviceImpl.UserServiceImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserInforController {

    @Autowired
    UserServiceImp userServiceImp;

    @RequestMapping("/getuseraddress/{id}")
    public String getUserAddress(@PathVariable("id") String id){
        return userServiceImp.getUserAddress(id);
    }

    @RequestMapping("/updateuserinfor/{phone}/{address}/{name}/{id}")
    public void updateUserInfor(@PathVariable("phone") String phone,@PathVariable("address") String address,@PathVariable("name") String name,@PathVariable("id") String id){
        userServiceImp.updateUserInfor(phone,address,name,id);
    }
}
